package bean;

import java.util.ArrayList;
import java.util.List;

public class teacher {
    String type;
    String name;
    int age;
    String time;

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getTime() {
        return time;
    }

    public void setTime(String time) {
        this.time = time;
    }

    @Override
    public String toString() {
        return "teacher{" +
                "type='" + type + '\'' +
                ", name='" + name + '\'' +
                ", age=" + age +
                ", time='" + time + '\'' +
                '}';
    }

    public static void main(String[] args) {
        List<teacher> teacherList = new ArrayList<teacher>();
        List<student> studentList = new ArrayList<student>();
        teacher teacher = new teacher();
        teacher teacher1 = new teacher();
        teacher.setAge(1);
        teacher1.setAge(2);
        student student = new student();
        student student1 = new student();
        student.setAge(11);
        student1.setAge(22);
        teacherList.add(teacher);
        teacherList.add(teacher1);
        studentList.add(student);
        studentList.add(student1);
        for (int i=0;i<teacherList.size();i++){
            for (int j=0;j<studentList.size();j++){
                System.out.println(teacherList.get(i));
                System.out.println(studentList.get(j));
            }
        }
    }
}
